home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1997 February / EnigmA AMIGA RUN 15 (1997)(G.R. Edizioni)(IT)[!][issue 1997-02][PLANET CD V].iso / enigma / earcd / emula / 6502emu.lha / 6502 / 6502-kernal.asm < prev    next >
Assembly Source File  |  1995-01-24  |  670b  |  73 lines

  1.     processor    6502
  2.     
  3.     org    $fe00
  4. init    cli
  5.     lda    #$00
  6.     sta    $06
  7.     lda    #$4
  8.     sta    $07
  9. loop    jsr    getin
  10.     cmp    #$00
  11.     beq    loop
  12.     jsr    chrout
  13.     jmp    loop
  14.  
  15. irqhandler    jsr    scnkey
  16.     jsr    udtim
  17.     rti
  18.  
  19. scnkey    lda    $dc01
  20.     bne    next
  21.     rts
  22. next    ldx    $c6
  23.     cpx    #$0a
  24.     beq    quit2
  25.     sta    $0277,x
  26.     inc    $c6
  27. quit2    rts
  28.  
  29.  
  30. chrout    ldy    #$00
  31.     sta    ($06),y
  32.     inc    $06
  33.     bne    quit1
  34.     inc    $07
  35.     lda    $07
  36.     cmp    #$08
  37.     bne    quit1
  38.     lda    #$04
  39.     sta    $07
  40. quit1    rts
  41.     
  42. getin    ldx    $c6
  43.     beq    nochar
  44.     dex
  45.     stx    $c6
  46.     lda    $0277,x
  47.     rts
  48. nochar    lda    #$00
  49.     rts
  50.  
  51. udtim    inc    $a2
  52.     bne    quit3
  53.     inc    $a1
  54.     bne    quit3
  55.     inc    $a0
  56. quit3    rts
  57.  
  58.  
  59.     org    $ff9f
  60.     jmp    scnkey
  61.     org    $ffd2
  62.     jmp    chrout
  63.     org    $ffe4
  64.     jmp    getin
  65.     org    $ffea
  66.     jmp    udtim
  67.     
  68.     org    $fffc
  69.     dc.w    init
  70.     dc.w    irqhandler
  71.  
  72.  
  73.